function ImportTestCase() {
    this.name = 'ImportTestCase';

    this._testImportError = function(name, message) {
        message = message.replace('$name', name).replace('$path', Import.__path(name))
        this.assertThrows(Import, new Import.error(message), null, name);
    }

    this.testImportErrors = function() {
	this._testImportError('foo', 'No module named $name at $path')
	this._testImportError('import.testcase', '$name ($path) is not valid module')
	this._testImportError('import.bad_module', 'Could not import name bad_name from module $name ($path)')
    };

    this.testDeepImport = function() {
	this.assertEquals(Import('import.foo').x, 99)
    };

    this.testSyntaxError = function() {
        var thrown = false
	try {
	    Import('import.baz')
	} catch (e) {
	    thrown = true
	    //alert(e instanceof Error)
	}
	this.assert(thrown)
    };
};

ImportTestCase.prototype = new TestCase;
